//
//  MainBViewController.swift
//  weile
//
//  Created by LKM on 16/10/27.
//  Copyright © 2016年 LKM. All rights reserved.
//

import UIKit

class MainBViewController: UIViewController {

    @IBOutlet weak var m1: UIImageView!
    @IBOutlet weak var m2: UIImageView!
    @IBOutlet weak var m3: UIImageView!
    @IBOutlet weak var m4: UIImageView!
    @IBOutlet weak var m5: UIImageView!
    @IBOutlet weak var m6: UIImageView!
    @IBOutlet weak var m7: UIImageView!
    @IBOutlet weak var m8: UIImageView!
    override func viewDidLoad() {
        super.viewDidLoad()

        // Do any additional setup after loading the view.
        ViewHelp.setOnClickListening(m1, self, #selector(onm1));
        ViewHelp.setOnClickListening(m2, self, #selector(onm2));
        ViewHelp.setOnClickListening(m3, self, #selector(onm3));
        ViewHelp.setOnClickListening(m4, self, #selector(onm4));
        ViewHelp.setOnClickListening(m5, self, #selector(onm5));
        ViewHelp.setOnClickListening(m6, self, #selector(onm6));
        ViewHelp.setOnClickListening(m7, self, #selector(onm7));
        ViewHelp.setOnClickListening(m8, self, #selector(onm8));
    }

    func onm1(){
        ActivityRequest.goMainTab(self,selectedIndex:  0,subSelectIndex:0)
    }
    func onm2(){
        ActivityRequest.goMainTab(self,selectedIndex:  0,subSelectIndex:1)
    }
    func onm3(){
        ActivityRequest.goMainTab(self,selectedIndex:  0,subSelectIndex:2)
    }
    func onm4(){
        ActivityRequest.goMainTab(self,selectedIndex:  0,subSelectIndex:3)
    }
    func onm5(){
        ViewHelp.showTipsView(containView: self.view, tips: "等待开放")
    }
    func onm6(){
        ActivityRequest.goMainTab(self,selectedIndex:1)
    }
    func onm7(){
        ActivityRequest.goMainTab(self,selectedIndex:2)
    }
    func onm8(){
        if(UserInfoCache.getInstance().checkGuest()){
            return
        }
        ActivityRequest.goMainTab(self,selectedIndex:3)
    }
    
    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepare(for segue: UIStoryboardSegue, sender: Any?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
